package org.liveboardgames.common.utils.collections
{
	import org.liveboardgames.common.dictionary.collections.HashCollection;
	import org.liveboardgames.common.dictionary.collections.IMap;

	public class CopyUtils
	{

		public static function cloneMap(map:IMap):IMap
		{
			var clone:IMap = null;

			if (map != null)
			{
				clone = new HashCollection();
				for each (var actionOutput:Object in map.getKeys())
				{
					var value:Object = map.getValue(actionOutput);
					clone.put(actionOutput, value);
				}
			}

			return clone;
		}

	}
}